package com.xzx.protobuf2;

/**
 *
 * @author xinzhixuan
 * @version 1.0
 * @date 2025/11/7 11:34
 */
public class TestPB {
    public static void main(String[] args) {
        MessagePB.Message message =  MessagePB.Message.newBuilder()
                .setType(MessagePB.Message.Type.STUDENT)
                .setStudent(MessagePB.Student.newBuilder()
                        .setName("xzx")
                        .setAge(18)
                        .build())
                .build();
        System.out.println(message.getType());
        System.out.println("=================================");
        System.out.println(message.getStudent());
        System.out.println("=================================");
        System.out.println(message.getTeacher());
        System.out.println("=================================");
        System.out.println(message);
    }
}
